home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / comm / mail / Mutt089src.lha / Mutt-0.89i-AMIGA / src / functions.h < prev    next >
C/C++ Source or Header  |  1998-01-28  |  12KB  |  312 lines

  1. /*
  2.  * Copyright (C) 1996-8 Michael R. Elkins <me@cs.hmc.edu>
  3.  * 
  4.  *     This program is free software; you can redistribute it and/or modify
  5.  *     it under the terms of the GNU General Public License as published by
  6.  *     the Free Software Foundation; either version 2 of the License, or
  7.  *     (at your option) any later version.
  8.  * 
  9.  *     This program is distributed in the hope that it will be useful,
  10.  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  *     GNU General Public License for more details.
  13.  * 
  14.  *     You should have received a copy of the GNU General Public License
  15.  *     along with this program; if not, write to the Free Software
  16.  *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  */ 
  18.  
  19. /*
  20.  * This file contains the structures needed to parse ``bind'' commands, as
  21.  * well as the default bindings for each menu.
  22.  *
  23.  * Notes:
  24.  *
  25.  * - If you want to bind \n or \r, use M_ENTER_S so that it will work
  26.  * correctly under both ncurses and S-Lang
  27.  *
  28.  * - If you need to bind a control char, use the octal value because the \cX
  29.  * construct does not work at this level.
  30.  *
  31.  */
  32.  
  33. struct binding_t OpGeneric[] = {
  34.   { "top-page",        OP_TOP_PAGE,        "H" },
  35.   { "next-entry",    OP_NEXT_ENTRY,        "j" },
  36.   { "previous-entry",    OP_PREV_ENTRY,        "k" },
  37.   { "bottom-page",    OP_BOTTOM_PAGE,        "L" },
  38.   { "refresh",        OP_REDRAW,        "\014" },
  39.   { "middle-page",    OP_MIDDLE_PAGE,        "M" },
  40.   { "exit",        OP_EXIT,        "q" },
  41.   { "tag-entry",    OP_TAG,            "t" },
  42.   { "next-page",    OP_NEXT_PAGE,        "z" },
  43.   { "previous-page",    OP_PREV_PAGE,        "Z" },
  44.   { "last-entry",    OP_LAST_ENTRY,        "*" },
  45.   { "first-entry",    OP_FIRST_ENTRY,        "=" },
  46.   { "enter-command",    OP_ENTER_COMMAND,    ":" },
  47.   { "next-line",    OP_NEXT_LINE,        ">" },
  48.   { "previous-line",    OP_PREV_LINE,        "<" },
  49.   { "half-up",        OP_HALF_UP,        "[" },
  50.   { "half-down",     OP_HALF_DOWN,        "]" },
  51.   { "help",        OP_HELP,        "?" },
  52.   { "tag-prefix",    OP_TAG_PREFIX,        ";" },
  53.   { "select-entry",    OP_GENERIC_SELECT_ENTRY,M_ENTER_S },
  54.   { "jump",        OP_JUMP,        NULL },
  55.   { "current-top",      OP_CURRENT_TOP,        NULL },
  56.   { "current-middle",   OP_CURRENT_MIDDLE,    NULL },
  57.   { "current-bottom",   OP_CURRENT_BOTTOM,    NULL },
  58.   { NULL,        0,            NULL }
  59. };
  60.  
  61. struct binding_t OpMain[] = {
  62.   { "create-alias",        OP_CREATE_ALIAS,        "a" },
  63.   { "bounce-message",        OP_BOUNCE_MESSAGE,        "b" },
  64.   { "change-folder",        OP_MAIN_CHANGE_FOLDER,        "c" },
  65.   { "change-folder-readonly",    OP_MAIN_CHANGE_FOLDER_READONLY,    "\033c" },
  66.   { "copy-message",        OP_COPY_MESSAGE,        "C" },
  67.   { "decode-copy",        OP_DECODE_COPY,            "\033C" },
  68.   { "decode-save",        OP_DECODE_SAVE,            "\033s" },
  69.   { "delete-message",        OP_DELETE,            "d" },
  70.   { "delete-pattern",        OP_MAIN_DELETE_PATTERN,        "D" },
  71.   { "delete-thread",        OP_DELETE_THREAD,        "\004" },
  72.   { "delete-subthread",        OP_DELETE_SUBTHREAD,        "\033d" },
  73.   { "forward-message",        OP_FORWARD_MESSAGE,        "f" },
  74.   { "flag-message",        OP_FLAG_MESSAGE,        "F" },
  75.   { "group-reply",        OP_GROUP_REPLY,            "g" },
  76. #ifdef USE_POP
  77.   { "fetch-mail",        OP_MAIN_FETCH_MAIL,        "G" },
  78. #endif
  79.   { "display-headers",        OP_DISPLAY_HEADERS,        "h" },
  80.   { "next-undeleted",        OP_MAIN_NEXT_UNDELETED,        "j" },
  81.   { "previous-undeleted",    OP_MAIN_PREV_UNDELETED,        "k" },
  82.   { "limit",            OP_MAIN_LIMIT,            "l" },
  83.   { "list-reply",        OP_LIST_REPLY,            "L" },
  84.   { "mail",            OP_MAIL,            "m" },
  85.   { "toggle-new",        OP_TOGGLE_NEW,            "N" },
  86.   { "toggle-write",        OP_TOGGLE_WRITE,        "%" },
  87.   { "search-next",        OP_SEARCH_NEXT,            "n" },
  88.   { "next-thread",        OP_MAIN_NEXT_THREAD,        "\016" },
  89.   { "next-subthread",        OP_MAIN_NEXT_SUBTHREAD,        "\033n" },
  90.   { "quit",            OP_QUIT,            "q" },
  91.   { "reply",            OP_REPLY,            "r" },
  92.   { "sort-mailbox",        OP_SORT,            "o" },
  93.   { "sort-reverse",        OP_SORT_REVERSE,        "O" },
  94.   { "print-message",        OP_PRINT,            "p" },
  95.   { "previous-thread",        OP_MAIN_PREV_THREAD,        "\020" },
  96.   { "previous-subthread",    OP_MAIN_PREV_SUBTHREAD,        "\033p" },
  97.   { "recall-message",        OP_RECALL_MESSAGE,        "R" },
  98.   { "read-thread",        OP_MAIN_READ_THREAD,        "\022" },
  99.   { "read-subthread",        OP_MAIN_READ_SUBTHREAD,        "\033r" },
  100.   { "save-message",        OP_SAVE,            "s" },
  101.   { "tag-pattern",        OP_MAIN_TAG_PATTERN,        "T" },
  102.   { "tag-thread",        OP_TAG_THREAD,            "\033t" },
  103.   { "untag-pattern",        OP_MAIN_UNTAG_PATTERN,        "\024" },
  104.   { "undelete-message",        OP_UNDELETE,            "u" },
  105.   { "undelete-pattern",        OP_MAIN_UNDELETE_PATTERN,    "U"},
  106.   { "undelete-subthread",    OP_UNDELETE_SUBTHREAD,        "\033u" },
  107.   { "undelete-thread",        OP_UNDELETE_THREAD,        "\025" },
  108.   { "view-attachments",        OP_VIEW_ATTACHMENTS,        "v" },
  109.   { "show-version",        OP_VERSION,            "V" },
  110.   { "set-flag",            OP_MAIN_SET_FLAG,        "w" },
  111.   { "clear-flag",        OP_MAIN_CLEAR_FLAG,        "W" },
  112.   { "exit",            OP_MAIN_EXIT,            "x" },
  113.   { "display-message",        OP_DISPLAY_MESSAGE,        M_ENTER_S },
  114.   { "sync-mailbox",        OP_MAIN_SYNC_FOLDER,        "$" },
  115.   { "search",            OP_SEARCH,            "/" },
  116.   { "search-reverse",        OP_SEARCH_REVERSE,        "\033/" },
  117.   { "shell-escape",        OP_SHELL_ESCAPE,        "!" },
  118.   { "display-address",        OP_DISPLAY_ADDRESS,        "@" },
  119.   { "pipe-message",        OP_PIPE,            "|" },
  120.   { "next-new",            OP_MAIN_NEXT_NEW,        "\t" },
  121.   { "previous-new",        OP_MAIN_PREV_NEW,        "\033\t" },
  122.   { "next-unread",        OP_MAIN_NEXT_UNREAD,        NULL },
  123.   { "previous-unread",        OP_MAIN_PREV_UNREAD,        NULL },
  124. #ifdef _PGPPATH
  125.   { "extract-keys",        OP_EXTRACT_KEYS,        "\013" },
  126.   { "forget-passphrase",    OP_FORGET_PASSPHRASE,        "\006" },
  127.   { "mail-key",            OP_MAIL_KEY,            "\033k" },
  128. #endif
  129.   { NULL,            0,                NULL }
  130. };
  131.  
  132. struct binding_t OpPager[] = {
  133.   { "create-alias",    OP_CREATE_ALIAS,        "a" },
  134.   { "bounce-message",    OP_BOUNCE_MESSAGE,        "b" },
  135.   { "change-folder",    OP_MAIN_CHANGE_FOLDER,        "c" },
  136.   { "change-folder-readonly",    OP_MAIN_CHANGE_FOLDER_READONLY,    "\033c" },
  137.   { "copy-message",    OP_COPY_MESSAGE,        "C" },
  138.   { "decode-copy",    OP_DECODE_COPY,            "\033C" },
  139.   { "delete-message",    OP_DELETE,            "d" },
  140.   { "delete-thread",    OP_DELETE_THREAD,        "\004" },
  141.   { "delete-subthread",    OP_DELETE_SUBTHREAD,        "\033d" },
  142.   { "forward-message",    OP_FORWARD_MESSAGE,        "f" },
  143.   { "flag-message",    OP_FLAG_MESSAGE,        "F" },
  144.   { "group-reply",    OP_GROUP_REPLY,            "g" },
  145.   { "display-headers",    OP_DISPLAY_HEADERS,        "h" },
  146.   { "exit",        OP_PAGER_EXIT,            "i" },
  147.   { "next-undeleted",    OP_MAIN_NEXT_UNDELETED,        "j" },
  148.   { "next-message",    OP_NEXT_ENTRY,            "J" },
  149.   { "previous-undeleted",OP_MAIN_PREV_UNDELETED,    "k" },
  150.   { "previous-message",    OP_PREV_ENTRY,            "K" },
  151.   { "list-reply",    OP_LIST_REPLY,            "L" },
  152.   { "redraw-screen",    OP_REDRAW,            "\014" },
  153.   { "mail",        OP_MAIL,            "m" },
  154.   { "search-next",      OP_SEARCH_NEXT,             "n" },
  155.   { "mark-as-new",    OP_TOGGLE_NEW,            "N" },
  156.   { "next-thread",    OP_MAIN_NEXT_THREAD,        "\016" },
  157.   { "next-subthread",    OP_MAIN_NEXT_SUBTHREAD,        "\033n" },
  158.   { "print-message",    OP_PRINT,            "p" },
  159.   { "previous-thread",    OP_MAIN_PREV_THREAD,        "\020" },
  160.   { "previous-subthread",OP_MAIN_PREV_SUBTHREAD,    "\033p" },
  161.   { "quit",        OP_QUIT,            "Q" },
  162.   { "reply",        OP_REPLY,            "r" },
  163.   { "recall-message",    OP_RECALL_MESSAGE,        "R" },
  164.   { "read-thread",    OP_MAIN_READ_THREAD,        "\022" },
  165.   { "read-subthread",    OP_MAIN_READ_SUBTHREAD,        "\033r" },
  166.   { "save-message",    OP_SAVE,            "s" },
  167.   { "decode-save",    OP_DECODE_SAVE,            "\033s" },
  168.   { "tag-message",    OP_TAG,                "t" },
  169.   { "toggle-quoted",    OP_PAGER_HIDE_QUOTED,        "T" },
  170.   { "undelete-message",    OP_UNDELETE,            "u" },
  171.   { "undelete-subthread",OP_UNDELETE_SUBTHREAD,        "\033u" },
  172.   { "undelete-thread",    OP_UNDELETE_THREAD,        "\025" },
  173.   { "view-attachments",    OP_VIEW_ATTACHMENTS,        "v" },
  174.   { "show-version",    OP_VERSION,            "V" },
  175.   { "search-toggle",    OP_SEARCH_TOGGLE,        "\\" },
  176.   { "display-address",    OP_DISPLAY_ADDRESS,        "@" },
  177.   { "next-new",        OP_MAIN_NEXT_NEW,        "\t" },
  178.   { "pipe-message",    OP_PIPE,            "|" },
  179.   { "help",        OP_HELP,            "?" },
  180.   { "next-page",    OP_NEXT_PAGE,            " " },
  181.   { "previous-page",    OP_PREV_PAGE,            "-" },
  182.   { "top",        OP_PAGER_TOP,            "^" },
  183.   { "bottom",        OP_PAGER_BOTTOM,        "$" },
  184.   { "shell-escape",    OP_SHELL_ESCAPE,        "!" },
  185.   { "search",        OP_SEARCH,            "/" },
  186.   { "search-reverse",    OP_SEARCH_REVERSE,        "\033/" },
  187.   { "enter-command",    OP_ENTER_COMMAND,        ":" },
  188.   { "next-line",    OP_NEXT_LINE,            M_ENTER_S },
  189.   { "jump",        OP_JUMP,            NULL },
  190.   { "next-unread",    OP_MAIN_NEXT_UNREAD,        NULL },
  191.   { "previous-new",    OP_MAIN_